package com.hnx.admin.aurora.system.domain.param.user.form;

import com.hnx.admin.aurora.annotation.KeyField;
import com.hnx.admin.aurora.annotation.RepeatTable;
import com.hnx.admin.aurora.annotation.ValidField;
import com.hnx.admin.aurora.web.json.BaseForm;
import lombok.Data;
import org.springframework.data.annotation.Id;

import javax.validation.constraints.NotEmpty;

/*
创建人： 倔强的头发
创建时间：2025/6/20
功能描述: 用户新增、修改、状态变更参数类

*/
@Data
@RepeatTable("sys_user")
public class UserForm extends BaseForm {
    @Id
    @KeyField("user_id")
    private String userId;
    private String deptId;
    @NotEmpty(message = "密码必须填写")
    private String password;
    @NotEmpty(message = "用户名称不能为空")
    @ValidField(msg="用户名称不能重复",column = "user_name")
    private String userName;
    @NotEmpty(message = "用户昵称不能为空")
    @ValidField(msg="用户昵称不能重复",column = "nick_name")
    private String nickName;
    private String realName;
    private Integer status;
    @ValidField(msg = "手机号码不能重复",column = "phonenumber",table = "sys_emp")
    private String phonenumber;
    private String sex;
    private String remark;
    private String[] postIds;
    private String[] roleIds;
    @ValidField(msg = "email不能重复",column = "email",table = "sys_emp")
    private String email;
    private String address;
    private String idCard;
    private String avatar;
}
